package com.five.community.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Village {
// EY auto_increment COMMENT '编号',   id INT PRIMARY K
    private long id;
//    village_id VARCHAR(20) NOT NULL UNIQUE COMMENT '小区编号',
    private String villageId;
//    name VARCHAR(20) NOT NULL COMMENT '小区名称',
    private String name;
//    place VARCHAR(20) NOT NULL COMMENT '小区地址',
    private String place;
//    area INT NOT NULL COMMENT '占地面积（m2）',
    private long area;
//    total_buildings INT NOT NULL COMMENT '总栋数',
    private long totalBuildings;
//    total_households INT NOT NULL COMMENT '总户数',
    private long totalHouseholds;
//    greening_rate INT NOT NULL COMMENT '绿化率（%）',
    private long greeningRate;
//    thumbnail VARCHAR(100) NOT NULL COMMENT '缩略图',
    private String thumbnail;
//    developers_name VARCHAR(20) NOT NULL COMMENT '开发商名称',
    private String developersName;
//    property_company VARCHAR(20) NOT NULL COMMENT '物业公司名称',
    private String propertyCompany;
//    create_date TIMESTAMP NOT NULL COMMENT '创建时间',
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    private Date createDate;
//    state TINYINT NOT NULL COMMENT '状态，0=可用，1=禁用'
    private boolean state;

    public Village(String villageId, String name, String place, long area, long totalBuildings, long totalHouseholds, long greeningRate, String thumbnail, String developersName, String propertyCompany, Date createDate, boolean state) {
        this.villageId = villageId;
        this.name = name;
        this.place = place;
        this.area = area;
        this.totalBuildings = totalBuildings;
        this.totalHouseholds = totalHouseholds;
        this.greeningRate = greeningRate;
        this.thumbnail = thumbnail;
        this.developersName = developersName;
        this.propertyCompany = propertyCompany;
        this.createDate = createDate;
        this.state = state;
    }
}
